package com.tarena.lbs.marketing.web.service;

import com.tarena.lbs.base.protocol.exception.BusinessException;
import com.tarena.lbs.base.protocol.pager.BasePageList;
import com.tarena.lbs.pojo.marketing.bo.CouponBO;
import com.tarena.lbs.pojo.marketing.param.CouponParam;
import com.tarena.lbs.pojo.marketing.param.UpdateParam;
import com.tarena.lbs.pojo.marketing.param.UserReceiveCouponParam;
import com.tarena.lbs.pojo.marketing.query.CouponQuery;

public interface CouponService {

    /**
     * 插入优惠券
     */
    void insert(CouponParam couponParam) throws BusinessException;

    /**
     * 更新优惠券
     */
    void update(CouponParam couponParam);

    /**
     * 更新优惠券状态
     */
    void updateStatus(UpdateParam updateParam);

    /**
     * 优惠券列表
     */
    BasePageList<CouponBO> list(CouponQuery couponQuery);

    /**
     * 优惠券详情
     */
    CouponBO getDetail(Integer couponId);

    /**
     * 用户领取优惠券
     */
    void userReceiveCoupon(UserReceiveCouponParam param) throws Exception;

    void executeAsync(UserReceiveCouponParam param) throws Exception;
}
